import { request } from "../utils/request";

export function roleList(data) {
    return request({
        url: '/auth/role/roleList',
        method: 'post',
        data
    })
}

export function updateRole(data) {
    return request({
        url: '/auth/role/updateRole',
        method: 'post',
        data
    })
}

export function deleteRole(data) {
    return request({
        url: '/auth/role/deleteRole',
        method: 'post',
        data
    })
}

export function addRole(data) {
    return request({
        url: '/auth/role/addRole',
        method: 'post',
        data
    })
}

export function permissionList(userId) {
    return request({
        url: `/auth/permission/permissionList/${userId}`,
        method: 'get'
       
    })
}

export function assignPermission(data) {
    return request({
        url: '/auth/role/assignPermission',
        method: 'post',
        data
    })
}